package com.didispace.chapter11.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;

/**
 * @author 田桂森 2020/7/24 0024
 */
@Data
@ApiModel(description = "用户实体")
@NoArgsConstructor//无参构造
public class User {
    @ApiModelProperty("用户编号")
    public Long id;
    @NotNull
    @Size(min = 2, max = 6)
    @ApiModelProperty("用户姓名")
    public String name;
    @ApiModelProperty("用户年龄")
    @NotNull
    @Max(150)
    @Min(1)
    public Integer age;

}
